19. Frames and iFrames
Accessibility Requirements
- WCAG SC 4.1.2 Name, Role, Value – For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.
Test Method Rationale
While users with vision can recognize the structure presented by frames and iframes, users without vision rely on programmatic elements to determine their content. This test method determines the adequacy of the code to describe the contents of any <frame>
or <iframe>
for Assistive Technology.
Limitations, Assumptions, or Exceptions
- In HTML5 the
<frame>
element is marked as obsolete. The<iframe>
element remains part of the HTML5 specification. While the<frame>
element has been deprecated in HTML5, testers may still encounter web pages and/or web applications with code that, while outdated, can and should still be accessible. - The combination of accessible name and accessible description of an
<iframe>
is its text alternative. - The Fourth Rule of ARIA Use states “do not use
role="presentation"
oraria-hidden="true"
on a focusable element. Using either of these on a focusable element will result in some users focusing on ‘nothing’.” - The Fifth Rule of ARIA Use states “all interactive elements must have an accessible name.”
19.A Test Procedure for Frames
Baseline Test ID: 19.A-FrameTitle
Identify Content
Frames
Test Instructions
- Check that each
<frame>
has a title attribute that is not empty. [SC 4.1.2] - Check that the title attribute describes the frame's content. [SC 4.1.2]
Test Results
If any of the above checks fail, then Baseline Test 19.A-FrameTitle fails.
19.B Test Procedure for iFrames
Baseline Test ID: 19.B-iFrameName
Identify Content
iFrames in the keyboard focus order
Test Instructions
- Check that the combination of the accessible name and accessible description for each iframe is not empty. [SC 4.1.2]
- Check that the non-empty combination of accessible name and description for each iframe describes its content. [SC 4.1.2]
- Check that the ARIA role is not "presentation". [SC 4.1.2]
- Check that the ARIA role is not "none". [SC 4.1.2]
- Check that the
aria-hidden
state is not "true". [SC 4.1.2]
Test Results
If any of the above checks fail, then Baseline Test 19.B-iFrameName fails.
Advisory: Tips for streamlined test processes
- None
WCAG 2.0 Techniques
The following techniques and/or common failures were considered when developing this test procedure for this baseline requirement: